package com.pcbly.web.business.workflow;

import java.util.List;

import com.pcbly.web.bean.workflow.WorkflowTransitionBean;
import com.pcbly.web.business.BaseServiceImp;
import com.pcbly.web.persistence.workflow.WorkflowTransitionDao;

public class WorkflowTransitionServiceImp extends
		BaseServiceImp<WorkflowTransitionBean> implements
		WorkflowTransitionService {
	public WorkflowTransitionServiceImp() {
		super();
	}

	private WorkflowTransitionDao workflowTransitionDao;

	public void setWorkflowTransitionDao(
			WorkflowTransitionDao workflowTransitionDao) {
		this.workflowTransitionDao = workflowTransitionDao;
	}

	@Override
	public void createWorkflowTransitionBean(WorkflowTransitionBean bean)
			throws Exception {
		// TODO Auto-generated method stub
		workflowTransitionDao.createWorkflowTransition(bean);
	}

	@Override
	public void deleteWorkflowTransitionBean(String id) throws Exception {
		// TODO Auto-generated method stub
		workflowTransitionDao.removeById(id);
	}

	@Override
	public WorkflowTransitionBean findWorkflowTransitionBeanById(String id)
			throws Exception {
		// TODO Auto-generated method stub
		return workflowTransitionDao.get(id);
	}

	@Override
	public List<WorkflowTransitionBean> findWorkflowTransitionBeansByStepId(
			String templateId, String preStepId, String nextStepId)
			throws Exception {
		// TODO Auto-generated method stub
		return workflowTransitionDao.findWorkflowTransitionBeansByStepId(
				templateId, preStepId, nextStepId);
	}

	@Override
	public void updateWorkflowTransitionBean(WorkflowTransitionBean bean)
			throws Exception {
		// TODO Auto-generated method stub
		workflowTransitionDao.saveObject(bean);
	}
}
